package mydesign.chapters03_factory.v1;


import mydesign.chapters03_factory.v1.factory.CheeseFactory;
import mydesign.chapters03_factory.v1.factory.SausageFactory;
import mydesign.chapters03_factory.v1.factory.SimplePizzaFactory;

public class PizzaStore {

    SimplePizzaFactory pizzaFactory;


    public void orderPizza(String type){
        if(type.equals("cheese")){
            pizzaFactory= new CheeseFactory();
        }else  if(type.equals("sausage")){
            pizzaFactory= new SausageFactory();
        }
        pizzaFactory.createPizza();
    }



}
